module Spec
  module Rails
    module Behaviors
      # A set of reuseable behaviors that should work with restfully architected applications
      module RestfulAuthentication
      
        # Based on restful authentication 
        describe "an action that requires login", :shared => true do
          before(:each) do
            controller.should_receive(:login_required)
          end
        end

        # Based on restful authentication 
        describe "an action that does not require login", :shared => true do
          before(:each) do
            controller.should_not_receive(:login_required)
          end
        end

     
      end
    end
  end
end

